#ifndef SYSTEMADMINPAGE_H
#define SYSTEMADMINPAGE_H


#include <QMessageBox>
#include <QTableWidgetItem>
#include "sqlhelper.h"
#include "mywidget.h"

namespace Ui {
class UserManagementPage;
}

class UserManagementPage : public MyWidget
{
    Q_OBJECT

public:
    explicit UserManagementPage(QWidget *parent = nullptr);
    ~UserManagementPage();

private slots:
    void on_pushButtonModify_clicked();
    void on_pushButtonDelete_clicked();
    void on_pushButtonInsert_clicked();

    void loadUserData();
    void on_tableWidgetUsers_itemSelectionChanged();  // 表格行选择变化

private:
    Ui::UserManagementPage *ui;
    int selectedRow = -1;  // 当前选中的表格行号
};

#endif // SYSTEMADMINPAGE_H
